#!/usr/bin/env python

print
print "Updating path+file index"

import database
db=database.getConnection()
cursor=db.cursor()

cursor.execute("update files join paths on files.pathid=paths.id set pathfile=reverse(substring(reverse(concat_ws('/',paths.pathname,files.filename)),1,255))  where files.pathfile is null");

